package org.bbelovic.devel.exercises.db;

import java.math.BigDecimal;
import java.util.Date;

/**
 * This class represents one credit transaction.
 *
 * Credit transactions are specified by user to which it belongs, by amount of credit consumed by 
 * credit transaction, by status of transaction and by date when it was created.
 */
public class CreditTransaction {

    private final long userId;
    private final BigDecimal amount;
    private final CreditTransactionStatus status;
    private final long dateCreated;
    
    public CreditTransaction(final long userId, final BigDecimal amount, final CreditTransactionStatus status, final Date dateCreated) {
        this.userId = userId;
        this.amount = amount;
        this.status = status;
        this.dateCreated = dateCreated.getTime();
    }
}
